package day08;

public class Truck extends Automobile{
    String type;
    public int getRent(int days){
        if(this.type == "小型"){
            return 300*days;
        }
        else if(this.type == "中型"){
            return 350*days;
        }
        else if(this.type == "大型"){
            return 500*days;
        }
        else{
            return -1;
        }
    }
    Truck(String brand,String plateNumber,String type){
        super(brand, plateNumber);
        this.type =type;
    }
}
